package com.ukao.steward.adapter;

import android.content.Context;
import android.widget.TextView;

import com.ukao.steward.R;
import com.ukao.steward.base.ListBaseAdapter;
import com.ukao.steward.base.SuperViewHolder;
import com.ukao.steward.bean.SearchUserBean;
import com.ukao.steward.util.CheckUtils;

import java.util.List;




public class AddressIdAdapter extends ListBaseAdapter<SearchUserBean.AddressListBean> {




    public AddressIdAdapter(Context context, List<SearchUserBean.AddressListBean> mHomeBean) {
        super(context, mHomeBean);
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_adapteraddressid;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        TextView phone = holder.getView(R.id.phone);
        TextView name = holder.getView(R.id.product_name);
        TextView regionalDesc = holder.getView(R.id.regionalDesc);
        SearchUserBean.AddressListBean item = mDataList.get(position);
        phone.setText(item.getPhone());
        name.setText(item.getName());
        regionalDesc.setText(CheckUtils.isEmptyString(item.getRegionalDesc())+CheckUtils.isEmptyString(item.getDesc()));
    }
}
